const Ext = typeof chrome !== 'undefined' ? chrome : browser;

function onReload() {
    Ext.runtime.reload();
}

function onDOMContentLoaded() {
    const { name, description, version } = Ext.runtime.getManifest();
    document.getElementById('name').innerText = name;
    document.getElementById('description').innerText = description;
    document.getElementById('version').innerText = version;
    document.getElementById('reload').addEventListener('click', onReload);
}

document.addEventListener('DOMContentLoaded', onDOMContentLoaded);
